<template>
  <a-card :bordered="false" style="margin-bottom: 10px">
    <BaseInfo :id="personId" />
    <a-tabs default-active-key="1" @change="onTabChange">
      <a-tab-pane key="1" tab="季度评估">
        <RecordList ref="recordList1" />
      </a-tab-pane>
      <a-tab-pane key="2" tab="年度评估" force-render>
        <RecordList ref="recordList2" />
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>
<script>
import BaseInfo from '@/views/sjsk/modules/BaseInfo'
import RecordList from './modules/RecordList'
export default {
  components: {
    BaseInfo,
    RecordList
  },

  data() {
    return {
      personId: JSON.parse(this.$route.query.record).personId,
    }
  },
  created() { },
  async mounted() {
    this.$refs.recordList1.setType(1)
    this.$refs.recordList1.onQuery()
  },
  methods: {
    onTabChange(val) {
      if (val == 1) { //季度评估
        this.$refs.recordList1.setType(1)
        this.$refs.recordList1.onQuery()
      }
      if (val == 2) {//年度评估
        this.$refs.recordList2.setType(2)
        this.$refs.recordList2.onQuery()
      }
    },
  },
}
</script>
<style lang="less" scoped>
.s1 {
  color: #1890FF;
}
</style>
